/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class PetFinder {
    static categoryCode = '010090010';

    static categoryName = '寻宠器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return PetFinder.categoryCode;
    }

    get categoryName() {
        return PetFinder.categoryName;
    }

    getExerciseTime(params) {
        return command({
            method: 'getExerciseTime',
            methodId: 'pZgubjmo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightSwitch(params) {
        return command({
            method: 'getLightSwitch',
            methodId: 'p1vZLi2W',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRingSwitch(params) {
        return command({
            method: 'getRingSwitch',
            methodId: 'pGox3y9R',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pDrhrHiz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightSwitch(params) {
        return command({
            method: 'setLightSwitch',
            methodId: 'ppAr4C3k',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setRingSwitch(params) {
        return command({
            method: 'setRingSwitch',
            methodId: 'peH3eU1q',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pUPQDAr1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default PetFinder;
